Optimize: rewrite getbyname_imm and getSRVbyname_imm as wrappers for getby#4961
Optimize: rewrite getbyname_imm and getSRVbyname_imm as wrappers for getby#4961oknet merged 1 commit intoapache:masterfrom
Conversation
8e9cc11 to
bb23a5d
Compare
iocore/hostdb/HostDB.cc
Outdated
| if (opt.flags & HOSTDB_FORCE_DNS_ALWAYS) { | ||
| force_dns = true; | ||
| } else if (opt.flags & HOSTDB_FORCE_DNS_RELOAD) { | ||
| force_dns = (hostdb_re_dns_on_reload ? true : false); |
There was a problem hiding this comment.
A couple of alternatives.
force_dns = host_db_re_dns_on_reload;
or
if (hostdb_re_dns_on_reload) {
force_dns = true;
HOST_DB_INCREMENT_DYN_STAT(..);
}
|
|
||
| if (!lock2.is_locked() && !trylock) { | ||
| // Refer to: [TS-374](http://issues.apache.org/jira/browse/TS-374) | ||
| lock2.acquire(thread); |
There was a problem hiding this comment.
This could be a deadlock concern, if the thread blocks on acquiring a lock.
There was a problem hiding this comment.
I just rewrote SCOPED_MUTEX_LOCK(lock, bucket_mutex, thread);.
There was a problem hiding this comment.
Please check the TS-374 commit via ba3b7d0.
It solves a performance issue of reverse proxy.
|
Overall I like the cleanup, but I'm quite concerned about the blocking lock. I don't see why cannot be bound in to the |
|
IMO, the |
|
Clearly, which is the reason to do a try lock. But if that fails, hard locking and creating blockage from lock contention is the slow path. |
|
@SolidWallOfCode The |
|
[approve ci autest] |
|
@SolidWallOfCode @vmamidi |


No description provided.